import mitt from "mitt"

export const emitter = mitt()

export const addEmitterListener = (event, callback) => {
    emitter.on(event, callback)
}

export const removeEmitterListener = (event, callback) => {
    emitter.off(event, callback)
}

export const broadcastEmitter = (event, args) => {
    emitter.emit(event, args)
}